package org.example.core.Controller;

import org.example.core.Dto.UserLoginRequestDto;
import org.example.core.Dto.common.Result;
import org.example.core.Service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/1.0/user")
public class UserController {
    @Autowired
    private UserService userService;


    @PostMapping("/login")
    public Result login(@RequestBody UserLoginRequestDto userLoginDto){

        return userService.LoginByPassword(userLoginDto);
    }
}
